Improve docs
authorMatthias Clasen <matthiasc@src.gnome.org>
Sat, 12 Jul 2008 00:36:35 +0000 (00:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 12 Jul 2008 00:36:35 +0000 (00:36 +0000)
svn path=/trunk/; revision=20819

docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtklabel.sgml

index ecad4c10c138e91c921f7f5cc07be55a199234a1..e89fa1725ed2d4d1e609b81f47d9d28571582a80 100644 (file)
@@ -1,3 +1,10 @@
+2008-07-11  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 537430 – label pango attributes & i18n
+
+       * gtk/tmpl/gtklabel.sgml: Improve docs for Pango attributes in 
+       builder xml. Pointed out by Christian Persch
+
 2008-07-10  Stefan Kost  <ensonic@users.sf.net>
 
         Bug 540967 – docs build slowly because of entities
index 25e10b12831dd239c0f0f43c6924aa679377e983..ad9179b894bfe0c4c8163a33b74f8d9dc1519b32 100644 (file)
@@ -17,18 +17,25 @@ implies, most labels are used to label another widget such as a
 The GtkLabel implementation of the GtkBuildable interface supports a 
 custom &lt;attributes&gt; element, which supports any number of &lt;attribute&gt;
 elements. the &lt;attribute&gt; element has attributes named name, value,
-start and end and allows you to specify #PangoAttributs for this label.
+start and end and allows you to specify #PangoAttribute values for this label.
 </para>
 <example>
-<title>A UI definition fragment specifying pango attributes</title>
+<title>A UI definition fragment specifying Pango attributes</title>
 <programlisting><![CDATA[
 <object class="GtkLabel">
   <attributes>
-    <attribute name=\"weight\" value=\"PANGO_WEIGHT_BOLD\"/>
+    <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+    <attribute name="background" value="red" start="5" end="10"/>"
   </attributes>
 </object>
 ]]></programlisting>
 </example>
+<para>
+The start and end attributes specify the range of characters to which the
+Pango attribute applies. If start and end are not specified, the attribute is
+applied to the whole text. Note that specifying ranges does not make much
+sense with translatable attributes. Use markup embedded in the translatable
+content instead.
 </refsect2>